﻿using PivotCollectionTools.Xml;
using Microsoft.VisualStudio.TestTools.UnitTesting;
namespace PivotCollectionTools.Xml.Test
{
    
    
    /// <summary>
    ///This is a test class for FacetCategoryTest and is intended
    ///to contain all FacetCategoryTest Unit Tests
    ///</summary>
    [TestClass()]
    public class FacetCategoryTest
    {


        private TestContext testContextInstance;

        /// <summary>
        ///Gets or sets the test context which provides
        ///information about and functionality for the current test run.
        ///</summary>
        public TestContext TestContext
        {
            get
            {
                return testContextInstance;
            }
            set
            {
                testContextInstance = value;
            }
        }

        #region Additional test attributes
        // 
        //You can use the following additional attributes as you write your tests:
        //
        //Use ClassInitialize to run code before running the first test in the class
        //[ClassInitialize()]
        //public static void MyClassInitialize(TestContext testContext)
        //{
        //}
        //
        //Use ClassCleanup to run code after all tests in a class have run
        //[ClassCleanup()]
        //public static void MyClassCleanup()
        //{
        //}
        //
        //Use TestInitialize to run code before running each test
        //[TestInitialize()]
        //public void MyTestInitialize()
        //{
        //}
        //
        //Use TestCleanup to run code after each test has run
        //[TestCleanup()]
        //public void MyTestCleanup()
        //{
        //}
        //
        #endregion


        /// <summary>
        ///A test for Name
        ///</summary>
        [TestMethod()]
        public void FacetCategory_Name_Test()
        {
            FacetCategory target = new FacetCategory();
            string expected = "nameTest";
            string actual;
            target.Name = expected;
            actual = target.Name;
            Assert.AreEqual(expected, actual);
        }
        
        /// <summary>
        ///A test for Format
        ///</summary>
        [TestMethod()]
        public void FacetCategory_Format_Test()
        {
            FacetCategory target = new FacetCategory();
            string expected = "C";
            string actual;
            target.Format = expected;
            actual = target.Format;
            Assert.AreEqual(expected, actual);
        }

        /// <summary>
        ///A test for FacetType
        ///</summary>
        [TestMethod()]
        public void FacetCategory_FacetType_Test()
        {
            FacetCategory target = new FacetCategory();
            FacetDataType expected = new FacetDataType();
            FacetDataType actual;
            target.FacetType = expected;
            actual = target.FacetType;
            Assert.AreEqual(expected, actual);
        }

        /// <summary>
        ///A test for FacetCategory Constructor
        ///</summary>
        [TestMethod()]
        public void FacetCategory_Constructor_Test()
        {
            FacetCategory target = new FacetCategory();
            Assert.IsNotNull(target);
        }

        /// <summary>
        ///A test for FacetCategory Constructor
        ///</summary>
        [TestMethod()]
        public void FacetCategory_Constructor_Name_Test()
        {
            string name = "Test Name";
            FacetDataType type = new FacetDataType(); // TODO: Initialize to an appropriate value
            bool isFilterVisible = false; // TODO: Initialize to an appropriate value
            bool isWordWheelVisible = false; // TODO: Initialize to an appropriate value
            bool isMetadataVisible = false; // TODO: Initialize to an appropriate value
            FacetCategory target = new FacetCategory(name, type, isFilterVisible, isWordWheelVisible, isMetadataVisible);
            Assert.AreEqual(target.Name, name);
        }

        [TestMethod()]
        public void FacetCategory_ConstructorFacetDataType_DateTime_Test()
        {
            string name = "Test Name";
            FacetDataType type = FacetDataType.DateTime;
            bool isFilterVisible = false; // TODO: Initialize to an appropriate value
            bool isWordWheelVisible = false; // TODO: Initialize to an appropriate value
            bool isMetadataVisible = false; // TODO: Initialize to an appropriate value
            FacetCategory target = new FacetCategory(name, type, isFilterVisible, isWordWheelVisible, isMetadataVisible);
            Assert.AreEqual(target.FacetType, FacetDataType.DateTime);
        }

        [TestMethod()]
        public void FacetCategory_ConstructorFacetDataType_Item_Test()
        {
            string name = "Test Name";
            FacetDataType type = FacetDataType.Item;
            bool isFilterVisible = false;
            bool isWordWheelVisible = false;
            bool isMetadataVisible = false;
            FacetCategory target = new FacetCategory(name, type, isFilterVisible, isWordWheelVisible, isMetadataVisible);
            Assert.AreEqual(target.FacetType, FacetDataType.Item);
        }

        [TestMethod()]
        public void FacetCategory_ConstructorFacetDataType_Link_Test()
        {
            string name = "Test Name";
            FacetDataType type = FacetDataType.Link;
            bool isFilterVisible = false;
            bool isWordWheelVisible = false;
            bool isMetadataVisible = false;
            FacetCategory target = new FacetCategory(name, type, isFilterVisible, isWordWheelVisible, isMetadataVisible);
            Assert.AreEqual(target.FacetType, FacetDataType.Link);
        }

        [TestMethod()]
        public void FacetCategory_Constructor_FacetDataType_LongString_Test()
        {
            string name = "Test Name";
            FacetDataType type = FacetDataType.LongString;
            bool isFilterVisible = false;
            bool isWordWheelVisible = false;
            bool isMetadataVisible = false;
            FacetCategory target = new FacetCategory(name, type, isFilterVisible, isWordWheelVisible, isMetadataVisible);
            Assert.AreEqual(target.FacetType, FacetDataType.LongString);
        }

        [TestMethod()]
        public void FacetCategory_Constructor_FacetDataType_Number_Test()
        {
            string name = "Test Name";
            FacetDataType type = FacetDataType.Number;
            bool isFilterVisible = false;
            bool isWordWheelVisible = false;
            bool isMetadataVisible = false;
            FacetCategory target = new FacetCategory(name, type, isFilterVisible, isWordWheelVisible, isMetadataVisible);
            Assert.AreEqual(target.FacetType, FacetDataType.Number);
        }

        [TestMethod()]
        public void FacetCategory_Constructor_FacetDataType_String_Test()
        {
            string name = "Test Name";
            FacetDataType type = FacetDataType.String;
            bool isFilterVisible = false;
            bool isWordWheelVisible = false;
            bool isMetadataVisible = false;
            FacetCategory target = new FacetCategory(name, type, isFilterVisible, isWordWheelVisible, isMetadataVisible);
            Assert.AreEqual(target.FacetType, FacetDataType.String);
        }

        [TestMethod()]
        public void FacetCategory_Constructor_Options_False_Test()
        {
            string name = "Test Name";
            FacetDataType type = FacetDataType.String;
            bool isFilterVisible = false;
            bool isWordWheelVisible = false;
            bool isMetadataVisible = false;
            FacetCategory target = new FacetCategory(name, type, isFilterVisible, isWordWheelVisible, isMetadataVisible);
            Assert.IsFalse(target.IsFilterVisible.Value);
            Assert.IsFalse(target.IsWordWheelVisible.Value);
            Assert.IsFalse(target.IsMetadataVisible.Value);
        }

        [TestMethod()]
        public void FacetCategory_Constructor_Options_True_Test()
        {
            string name = "Test Name";
            FacetDataType type = FacetDataType.String;
            bool isFilterVisible = true;
            bool isWordWheelVisible = true;
            bool isMetadataVisible = true;
            FacetCategory target = new FacetCategory(name, type, isFilterVisible, isWordWheelVisible, isMetadataVisible);
            Assert.IsTrue(target.IsFilterVisible.Value);
            Assert.IsTrue(target.IsWordWheelVisible.Value);
            Assert.IsTrue(target.IsMetadataVisible.Value);
        }
    }
}
